According to the general theory of relativity, there must have been a state of infinite density in the past, the big bang, which would have been an effective beginning of time. Similarly, if the whole universe recollapsed, there must be another state of infinite density in the future, the big crunch, which would be an end of time. Even if the whole universe did not recollapse, there would be singularities in any localized regions that collapsed to form black holes. These singularities would be an end of time for anyone who fell into the black hole. At the big bang and other singularities, all the laws would have broken down, so God would still have had complete freedom to choose what happened and how the universe began.
When we combine quantum mechanics with general relativity, there seems to be a